using System;
using System.Web.UI;
using System.Collections.Generic;

using SBPweb.Common.Session;

using SBPweb.PROvibe.Presentation.Controls;

namespace SBPweb.PROvibe.Presentation.Host.Pages
{
	public partial class Default : MaintainedPage
	{
		protected void Page_Load(object sender, EventArgs e)
		{
            //Business.Entities.Module entity = Business.Warehouse.ModuleFactory.ReadModuleById(15);
            //Business.Modularity.IModule module = Business.Modularity.ModuleLoader.CreateModuleInstance(entity, "SBPweb.PROvibe.Presentation.Modules.DocumentProvider.ImageViewer");
            //Control c = Business.Modularity.ModuleLoader.AddAsControl(module, this);

            Business.Warehouse.ModuleFactory.CreateModule("DocumentProvider", "c:\\SBPweb.PROvibe.Presentation.Modules.DocumentProvider.dll");
            /*
			List<Business.Entities.Actor> actors = null;//Business.Logic.Warehouse.ActorFactory.ReadActors();

			actors = Business.Logic.Warehouse.ActorSiteRoleFactory.ReadActorsBySiteIdAndRoleId(1, 1);
            */
			/*
			Business.Entities.Warehouse.Actor actor = Business.Logic.Warehouse.Actor.ReadActorByName("admin");

			actor.LastActivity = DateTime.Now;

			Business.Logic.Warehouse.Actor.UpdateActor(actor);
			*/
			/*
			string useCache = Request["cache"];
			if (string.IsNullOrEmpty(useCache))
			{
				SBPweb.PROvibe.Business.Logic.ConfigurationManager.CacheExpirations.IsCachingUsed = Convert.ToBoolean(useCache);
			}

			Title = RequestManager.HttpHost;

			Random rnd = new Random();

			for (int i = 0; i < 100; i++)
			{
				DateTime start = DateTime.Now;

				List<Actor> actors = Business.Logic.Warehouse.Actor.GetAllActors();
				System.Threading.Thread.Sleep(rnd.Next(100));

				TimeSpan span = DateTime.Now.Subtract(start);

				l.Text += string.Format("{0}: {1}<br />", i, span);
			}
			*/
		}
	}
}